﻿
// StoreSCUDlg.h: 头文件
//

#pragma once

#define UM_ADD_LOG      WM_USER + 10

// CStoreSCUDlg 对话框
class CStoreSCUDlg : public CDialogEx
{
// 构造
public:
	CStoreSCUDlg(CWnd* pParent = nullptr);	// 标准构造函数

// 对话框数据
#ifdef AFX_DESIGN_TIME
	enum { IDD = IDD_STORESCU_DIALOG };
#endif

	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV 支持


// 实现
protected:
	HICON m_hIcon;
	CBrush m_brBlack;

	// 生成的消息映射函数
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
	afx_msg LRESULT OnAddLog(WPARAM wParam, LPARAM lParam);
	afx_msg void OnBnClickedButtonStorescuOpenfile();
	afx_msg void OnBnClickedButtonStorescuOpendir();
	afx_msg void OnBnClickedButtonStorescuClearfile();
	afx_msg void OnBnClickedButtonStorescuSend();
	afx_msg void OnBnClickedButtonStorescuClrlog();
	afx_msg void OnBnClickedButtonStorescuEcho();
	DECLARE_MESSAGE_MAP()

protected:
	void addLog(CString str);
	void UpdateWidth(LPCTSTR lpszItem);
	void EnumFileInDir(CString dir, std::vector<CString>& vec, LPCTSTR ext = NULL);

private:
	CString m_localAET;
	CString m_remoteAET;
	CString m_serverIP;
	UINT m_port;
	CComboBox m_cmbLL;
	CListBox m_lstFiles;
	CEdit m_log;

	int m_nListWidth;
	CString m_dir;

	std::vector<std::string> m_files;

};
